<template>
  <div class="child">
    <h2>我是Child</h2>
    热不热：<input type="checkbox" :checked="isHot" @click="changeIsHot">
  </div>
</template>

<script>
  export default {
    name:'Child',
    props:['isHot','updateIsHot'],
    methods: {
      changeIsHot(event){
        this.updateIsHot(event.target.checked)
      }
    },
  }
</script>

<style>
  .child {
    background-color: skyblue;
    border-radius: 10px;
    box-shadow: 0 0 10px;
    padding: 20px;
  }
  input {
    width: 50px;
    height: 50px;
  }
</style>